package com.guigu.www.cxk.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.www.cxk.service.CXKBespeakResultService;
import com.guigu.www.mapper.BespeakMapper;
import com.guigu.www.mapper.BespeakResultMapper;
import com.guigu.www.mapper.PersonClassificationMapper;
import com.guigu.www.pojo.Bespeak;
import com.guigu.www.pojo.BespeakResult;
import com.guigu.www.pojo.PersonClassification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CXKBespeakResultServiceImpl implements CXKBespeakResultService {
    @Autowired
    BespeakMapper mapper;

    @Autowired
    BespeakResultMapper bespeakResultMapper;

    @Autowired
    PersonClassificationMapper personClassificationMapper;
    @Override
    public List<Bespeak> selectBespeak(int id) {
        return mapper.selectbeskpeak(id);
    }

    @Override
    public BespeakResult selectByIdResult(int id) {
        QueryWrapper<BespeakResult> wrapper = new QueryWrapper<>();
        wrapper.eq("bes_id ",id);
        return bespeakResultMapper.selectOne(wrapper);
    }

    @Override
    public List<PersonClassification> selectClassifica() {
        return personClassificationMapper.selectClassifica();
    }
}
